import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/progress',
    name: 'Progress',
    component: () => import('@/views/Progress.vue')
  },
  {
    path: '/profile',
    name: 'Profile',
    component: () => import('@/views/Profile.vue')
  },
  {
    path: '/exercise/:id',
    name: 'Exercise',
    component: () => import('@/views/Exercise.vue')
  },
  {
    path: '/course/:id',
    name: 'Course',
    component: () => import('@/views/Course.vue')
  },
  {
    path: '/point/:id',
    name: 'KnowledgePoint',
    component: () => import('@/views/KnowledgePoint.vue')
  },
  {
    path: '/learning-path',
    name: 'LearningPath',
    component: () => import('@/views/LearningPath.vue')
    },
  // {
  //   path: '/error-book',
  //   name: 'ErrorBook',
  //   component: () => import('@/views/ErrorBook.vue')
  // },
  // {
  //   path: '/exam/:courseId?',
  //   name: 'Exam',
  //   component: () => import('@/views/ExamMode.vue')
  // },
  {
    path: '/learner-profile',
    name: 'LearnerProfile',
    component: () => import('@/views/LearnerProfile.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router